package com.itheima.d01_thread_create;
/*
* 1.创建类，继承Thread*/

public class MyThread extends  Thread{
    /*
    * 重写run方法，设置线程做的事
    * */
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("子线程1：" + i);
            try {
                Thread.sleep(1001);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
